Slider = function(options){
	var _options = {};
	$.extend(_options,this._options,options);
	$.extend(this,{
		_options:_options
	});
	this._init();
};
$.extend(Slider.prototype,Timer.prototype,{
	_during:2000, 
	_options:{
		index:null,
		content:null,
		hotcls:"cur",
		callback:null,
		duration:1000
	},
	_count:0,
	_index:0,
	_oddidx:0,
	_init:function(){
		this._count = $(this._options.index).size();
		this._registerEvent();
	},  
	_registerEvent:function(){
		var self = this;
		$(this._options.index).click(function(){
			var index = $(self._options.index).index(this);
			self._onIndexClick(index);   
		});
	},
	_onIndexClick:function(idx){
		this._index = idx;
		this.selectIndex(idx);
	},
	prev:function(){
		this._oddidx = this._index;
		this._index--;
		if(this._index<0){
			this._index = this._count-1; 
		}
		this.selectIndex(this._index);
	},
	next:function(){
		this._oddidx = this._index;
		this._index++;
		if(this._index==this._count){
			this._index = 0; 
		}
		this.selectIndex(this._index);
	},
	selectIndex:function(idx){
		this.stop();
		$(this._options.index).removeClass(this._options.hotcls).eq(idx).addClass(this._options.hotcls);
		
		$(this._options.content).hide().eq(idx).fadeIn();            
		if(this._options.callback){
			this._options.callback(idx);
		}
		this.start(); 
	},
	_onTick:function(){
		this.next();
	}
});